import {createRouter as _createRouter, createWebHistory} from 'vue-router';
// 导入 凡是想要通过路由跳转的，都需要在这：1.导入  2.注册 设置对应vue组件的路径名
import index from '../views/index.vue'
import my from '../views/my.vue'
import register from '../views/register.vue'
import login from '../views/login.vue'
import findpass from '../views/find.vue'
import question from '../views/question.vue'
import addquestion from '../views/addquestion.vue'
import answers from '../views/answers.vue'




const routes = [
    // 注册 设置对应vue组件的路径名
    { path: '/', component: index },
    { path: '/login', component: login },
    { path: '/register', component: register },
    { path: '/find', component: findpass },
    { path: '/my', component: my },
    { path: '/question', component: question },
    { path: '/addquestion', component: addquestion },
    { path: '/answers', component: answers },

]

export function createRouter() {
    return _createRouter({
        history: createWebHistory(),
        routes
    })
}